Read about jvm performance tuning interview questions, The latest news, videos, and discussion topics about jvm performance tuning interview questions from alibabacloud.com
The individual believes that JVM tuning is primarily addressed by the following methods1. Set the appropriate maximum heap memory (maximum and value for Cenozoic and Laosheng generations) and minimum heap memory (the operating system memory size consumed by JVM startup), and set the scale allocation of the heap.2, set up the suitable new generation because of its
with a graphical performance detection tool. Ability to monitor memory, threads, class loading, virtual machine information, and moreVisual VM is a multi-in-one graphical performance detection tool that integrates a variety of new capability detection tools. Can replace some of the JDK's own tools, if JSTATE,JPS, etc.The Mat full name Memory Analyzer is a powerful Java heap analysis tool capable of analyzi
The main processes of tuning the JVM are:1. Determine heap memory size (-XMX,-XMS)2, the rational distribution of the new generation and old generation (-xx:newratio,-XMN,-xx:survivorratio)3. Determine the size of the permanent zone (-xx:permsize,-xx:maxpermsiize)4. Select the garbage collector5, the garbage collector to set reasonable6. Disable GC (-XX:+DISABLEEXPLICITGC)7. Disable class Metadata recycling
The JVM is the heavy load machine behind Java features and performance, which most developers take for granted. However, few of us understand how the JVM works-like task assignments and garbage collection, turning threads, opening and closing files, interrupting and/or JIT compiling Java bytecode, and so on.
Not being familiar with the
excerpt from: http://uule.iteye.com/blog/2114697Summary of JVM garbage collection and performance tuningSeveral strategies for tuning the JVMFirst, JVM memory model and garbage collection algorithm1. According to the Java Virtual Machine specification, theJVM divides the memory into:
New (Young Generation)
The JDK itself provides many convenient JVM performance tuning monitoring tools, in addition to the integrated VISUALVM and Jconsole, there are JPS, Jstack, Jmap, Jhat, Jstat and other small tools, this blog hope to play a useful, Let's start to understand the common tools for tuning
JVM Tuning Tool
Jconsole,jprofile,visualvm
JCONSOLE:JDK, the function is simple, but can be used in a certain load of the system. The garbage collection algorithm is tracked in detail. Detailed description Reference here
Jprofiler: Commercial software, you need to pay. function is powerful. Detailed description Reference here
VISUALVM:JDK, powerful, similar to Jprofiler. Recommended.
How to Tune
Observe
compressing and extending the heap space:-xx:minheapfreeratio: Sets the minimum idle scale for heap space. The default is 40. When the free memory in the heap space is less than this value, the JVM expands the heap space.-xx:maxheapfreeratio: Sets the maximum idle scale for heap space. The default is 70. When the free memory in the heap space is greater than this value, the heap space is compressed and a smaller heap is obtained.When-xms and-xmx are
This article transferred from: http://www.cnblogs.com/chen77716/archive/2010/06/26/2130807.htmlRecent memory leaks due to the project, so large-scale JVM performance tuning, now the experience to do a record.First, JVM memory model and garbage collection algorithm1. According to the Java Virtual Machine specification,
Recently, due to Project Memory leakage, large-scale JVM performance tuning has been performed.
,
Now we will record the experience.
I. JVM Memory Model and garbage collection Algorithm
1. According to the Java Virtual Machine specification, JVM divides the memory:
New (yo
In addition to the integrated VISUALVM and Jconsole, the JDK itself provides performance tuning monitoring tools such as JPS, Jstack, Jmap, Jhat, and Jstat.In Java development, we sometimes encounter the following problems:OutOfMemoryError, Low memoryMemory leaksThread deadlockLock contention (lock contention)The Java process consumes too much CPU......These problems may be overlooked by many people in thei
JVM Performance Analysis and Tuning
1) reasonably configure Parameters
Jvm memory = heap memory + non-heap memory
Heap memory = new generation + Old Generation = 1 Eden zone + 2 vivo VO zones
Non-heap memory = persistent generation + code Cache
-Server: server mode. This parameter is placed at the beginning of the con
, the most important of which is how long the thread has been running. Consider this factor to allow each thread to get the chance to run. So, regardless of how low the priority of the thread is set, they always get the chance to run.In addition, the weight of the thread priority set on the different OS is different. On Unix-based systems, the execution time of a thread is a factor in the current priority of the dominant thread, which means that the thread priority set is rarely "referenced". On
1. JPS (Java Virtual machine Process Status Tool)JPS is primarily used to output process state information running in the JVM-Q does not output the class name, jar name, and parameters passed in the Main method-m output parameters that pass in the Main method-L OUTPUT The full name of the main class or Jar-V Output parameters for incoming JVM2. JstackJstack is used primarily to view thread stack information within a Java processThe command line parame
Recreate the classic, uncover the face of the pseudo-tall, easy to handle jvm!1. JVM base (selection, memory model, GC, etc.)2. JVM Key Parameters3. JVM monitoring (commands, tools)4. Typical JVM performance issues (CPU, memory le
ObjectiveAfter getting started with the JVM garbage collection mechanism, you can then learn the performance tuning. There are two main parts of the content:
The use of JDK tools.
Tuning strategy.
Weapon Spectrum JPSList the running virtual machine processes, using the following:JPS [-option] [HostID]
First, JVM performance tuning strategySecond, performance tuning1. Java thread Pool (java.util.concurrent.ThreadPoolExecutor)The thread pool used by most applications on JVM6 is the thread pool that comes with the JDK, and the thread pool of mature Java threads is verbose because the thread pool behaves a bit like we i
Directbytebuffer object stored in the Java heap, which can significantly improve performance in some situations because it avoids replicating data back and forth in the Java heap and the native heap. The allocation of native direct memory is not limited by the size of the Java heap, but since memory is certainly limited by the total native memory size and processor addressing space. When you configure virtual machine parameters, you set-XMX parameter
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.